<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Demo</title>

<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="fsd.config.js"></script>
<script type="text/javascript" src="fsd.all.js"></script>

<script type="text/javascript">
	//调用图片管理
	function getFsdFileManagerDialog(){
		var manager = new FsdFileManager();
        manager.autoName = true;
        manager.rootpath = 'uploadfiles/';
        manager.setSelectListener = function(item1, item2 , item3) {
             alert(item3);
        };
        manager.getManagerDialog();
	}
	
	
	//调用图片上传
	function getFsdFileUploadDialog(){
		var manager = new FsdFileManager();
        manager.autoName = true;
        manager.rootpath = 'uploadfiles/image/';
        manager.setOkListener = function(serverPathList) {
            if (serverPathList.length > 0) {
                alert(serverPathList[0]);
            }
        }
        manager.getUploadDialog();
	}
	
	//调用图片浏览
	function getFsdImgViewDialog(){
		 var manager = new FsdFileManager();
	        manager.setImgUrl = "uploadfiles/image/6.jpg";
	        manager.getImgviewDialog();
	}
	
	//调用图片获取
	function getFsdImgLoadDialog(){
		var manager = new FsdFileManager();
		manager.htmlContent = "aaaaaaaaaaaaaaaaaaaaaaa";
        manager.selectlistener = function(path) {
            alert(path);
        }
        manager.getImgLoadDialog();
	}
</script>
</head>
<body>
	<button onclick="getFsdFileManagerDialog()">文件管理</button>
	<button onclick="getFsdFileUploadDialog()">文件上传</button>
	<button onclick="getFsdImgViewDialog()">文件浏览</button>
	<button onclick="getFsdImgLoadDialog()">获取图片</button>
</body>
</html>